package com.bridge.common.result;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "MenuVo", description = "菜单/按钮")
public class MenuVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "菜单名称")
    private String menuName;

    @ApiModelProperty(value = "菜单code，与后台前端对应")
    private String name;

    @ApiModelProperty(value = "跳转地址/后台地址")
    private String path;

    @ApiModelProperty(value = "下一级菜单")
    private List<MenuVo> children;

    @ApiModelProperty(value = "meta")
    private MateNode meta;

    @Data
    @EqualsAndHashCode(callSuper = false)
    @ApiModel(value = "mateNode", description = "菜单/按钮")
    public static class MateNode {
        @ApiModelProperty(value = "图标地址/图标标识")
        private String icon;
        @ApiModelProperty(value = "菜单code")
        private String locale;
        @ApiModelProperty(value = "是否登陆唯一")
        private boolean requiresAuth = true;

        @ApiModelProperty(value = "按钮权限")
        private List<String> roles;
    }
}